package com.njxxted.activiti.modules.process.defintion.service;

import com.njxxted.activiti.common.response.ResponseVo;
import com.njxxted.activiti.modules.process.defintion.entity.ActNodeConfigEntity;
import com.njxxted.activiti.modules.process.extend.entity.ExtendActInstanceEntity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 描述：流程定义 service
 * <p>
 * 作者：Ostrich Hu
 * 时间：2019/9/3 15:00 星期二
 */
public interface IActDefinitionService {

    /**
     * 流程定义设置
     *
     * @param request 请求参数
     * @return ResponseVo
     */
    ResponseVo processDefinitionSettings(HttpServletRequest request);

    /**
     * 获取流程定义图片
     *
     * @param modelId
     * @param response
     */
    void getDefinitionImage(String modelId, HttpServletResponse response) throws IOException;

    /**
     * 获取流程定义设置信息
     *
     * @param param
     * @return
     */
    List<Map<String, Object>> getProcessDefinitionSettings(ActNodeConfigEntity param);

    /**
     * 根据流程定义发起流程实例
     *
     * @param request
     * @return
     */
    ExtendActInstanceEntity startInstanceByDefinition(HttpServletRequest request);

    /**
     * 获取流程执行路劲图片
     *
     * @param instanceId 流程实例id
     * @param response
     */
    void getFlowExecutionRouteImage(String instanceId, HttpServletResponse response);

    /**
     * 更新流程实例
     *
     * @param request
     * @return
     */
    ExtendActInstanceEntity updInstanceByDefinition(HttpServletRequest request);
}
